package com.fivemin.util;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class Result {
   private Map<String,Object> data = new HashMap<>();

    public Result() {
    }

    public Result(Map<String, Object> data) {
        this.data = data;
    }

    public <T> Result (String msg,T rows){
        this.data.put("code",200);
        this.data.put("msg",msg);
        this.data.put("rows",rows);
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "data=" + data +
                '}';
    }
}
